import {http} from "@/utils/request"

export default {
	upload: {
		url: `/gateway-admin/upload`,
		name: "文件上传",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	uploadFile: {
		url: `/gateway-admin/uploadFile`,
		name: "附件上传",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	exportFile: {
		url: `/gateway-admin/fileExport`,
		name: "导出附件",
		get: async function (data, config = {}) {
			return await http.get(this.url, data, config);
		}
	},
	importFile: {
		url: `/gateway-admin/fileImport`,
		name: "导入附件",
		post: async function (data, config = {}) {
			return await http.post(this.url, data, config);
		}
	},
	file_menu: {
		url: `/gateway-admin/file/menu`,
		name: "获取文件分类",
		get: async function () {
			return await http.get(this.url);
		}
	},
	file_list: {
		url: `/gateway-admin/file/list`,
		name: "获取文件列表",
		get: async function (params) {
			return await http.get(this.url, params);
		}
	}
}
